<form method="POST" action="<?php echo $this->url ();?>">
<div id="logindiv" align="center">

<h2>Change Password</h2>
<table id="tblcmponents" id="tblcmponents" cellpadding="6" border="0">
	<tr class="lbl">
		<td><?=$this->formLabel ( 'txtoldpass', 'Old Password' )?></td>
		<td><?=$this->formPassword ( 'txtoldpass', '' )?></td>
	</tr>
	<tr>
		<td><?=$this->formLabel ( 'txtnewpasswd', 'New Password' )?></td>
		<td><?=$this->formPassword ( 'txtpasswd', '' )?></td>

	</tr>

	<tr>
		<td><?=$this->formLabel ( 'txtcnfrmnewpasswd', 'Retype Password' )?></td>
		<td><?=$this->formPassword ( 'txtcnfrmpasswd', '' )?></td>

	</tr>

	<tr>
		<td><?=$this->formSubmit ( 'btnlogin', 'Save' )?></td>
		<td><?=$this->formReset( 'btnreset', 'Reset' )?></td>

	</tr>

</table>
<?php if ($this->success) {?>
    <p>You have successfully updated the password. You can proceed to your profile page from <a href="<?php 
        $userSession = new Zend_Session_Namespace('userSession');
        $userHome = $userSession->userHome;
        echo $this->baseUrl($userHome);
    ?>">HERE</a>.</p>
<?php } ?>
</div>
 

<?php
if (isset ( $this->msg )) {
	?>
<?php

	echo "<script>alert('" . $this->msg . "')</script>";
	?>
<?php
}
?>

 <?php
	if (isset ( $this->login )) {
		?>
<?php

		echo ("<script type=text/javascript>$('#logindiv').hide(); </script>");
		?>
<?php
	}
	?>
</form>

<script type="text/javascript">
$(function(){
	
	$('#txtcnfrmpasswd').blur(function(){
		if($('#txtcnfrmpasswd').val() != $('#txtpasswd').val())
			
			alert('Enter Correct New Password')
		});	
	
	
});



</script>



